package com.fr.report.web.ui;

import com.fr.base.core.DateUtils;
import java.text.DateFormat;
import java.util.Date;

public class DateTimeEditor extends DateEditor
{
  public DateTimeEditor()
  {
    setFormatText("yyyy-MM-dd HH:mm");
  }

  protected Object value2Config(Object paramObject)
  {
    String str;
    if (paramObject instanceof Date)
      str = DateUtils.DATETIMEFORMAT2.format((Date)paramObject);
    else
      str = (paramObject == null) ? "" : paramObject.toString();
    return str;
  }

  public boolean equals(Object paramObject)
  {
    return ((paramObject instanceof DateTimeEditor) && (super.equals(paramObject)));
  }
}